<?php
    $menu_root=$t->layroot();
?>
<ul>
        <li><a href="<?=$rootURL?>index.html"><? if($lang=='vi') echo 'Trang chủ'; else echo 'Home page';?></a>
        <ul class="cap1">
                <li style="width: 200px;">
                        <div class="k_submenu">
                                <a href="<?=$rootURL?>index.html" class="link1"><? if($lang=='vi') echo 'Trang chủ'; else echo 'Home page';?></a>
                                <a href="<?=$rootURL?>gioi-thieu.html" class="link2"><? if($lang=='vi') echo 'Giới thiệu'; else echo 'Introduce';?></a>
                                <a href="<?=$rootURL?>tuyen-dung.html" class="link2"><? if($lang=='vi') echo 'Tuyển dụng'; else echo 'Recruitment';?></a>
                                <a href="<?=$rootURL?>lien-he.html" class="link2"><? if($lang=='vi') echo 'Liện hệ'; else echo 'Contact';?></a>
                        </div>
                </li>
        </ul>
    </li>
    <?php
    $i=0;
foreach ($menu_root as $row_menu_root) { $i++;
    ?>
    <li class="tinhtoan<?=$i?>" ><a href="<?=$rootURL?>root/<?php echo $row_menu_root['id']?>/<?php echo $t->changeTitle($row_menu_root['ten_'.$lang])?>.html"><?php echo $row_menu_root['ten_'.$lang]?></a>
        <ul class="cap1">
            <li class="cap2">
                        <?php                           
                        $id_root=$row_menu_root['id'];
                        $menu_tin_theloai=$t->laytin_theloai($id_root);
                        foreach ($menu_tin_theloai as $row_menu_tin_theloai) {
                        ?>
                        <div class="k_submenu">
                                <a href="<?=$rootURL?>menu1/<?php echo $row_menu_tin_theloai['id']?>/<?php echo $t->changeTitle($row_menu_tin_theloai['ten_'.$lang])?>.html" class="link1"><?php echo $row_menu_tin_theloai['ten_'.$lang] ?></a>
                                <?php
                                $id_theloai=$row_menu_tin_theloai['id'];
                                $menu_tin_loaitin=$t->laytin_loai($id_theloai);
                                foreach ($menu_tin_loaitin as $row_menu_tin_loaitin) {
                                ?>
                                <a href="<?=$rootURL?>menu2/<?php echo $row_menu_tin_loaitin['id']?>/<?php echo $t->changeTitle($row_menu_tin_loaitin['ten_'.$lang])?>.html" class="link2"><?php echo $row_menu_tin_loaitin['ten_'.$lang] ?></a>
                                <?php }?>
                        </div>
                    <?php }?>
                </li>
        </ul>
    </li>
    <?php }?>
    
                <li><a href="<?=$rootURL?>Ve-May-Bay"><? if($lang=='vi') echo 'Vé máy bay'; else echo 'Air ticket';?></a>
                        <ul class="cap1">
                <li style="margin-left:-500px; width: 600px;">
                        <div class="k_submenu">
                                <a href="<?=$rootURL?>Ve-VNAirline.html" class="link1">Vietnam Airlines</a>
                        </div>
                        <div class="k_submenu">
                                <a href="<?=$rootURL?>Ve-Airmekong.html" class="link1">Mekong Airlines</a>
                        </div>
                        <div class="k_submenu">
                                <a href="<?=$rootURL?>Ve-Jetstar.html" class="link1">Jetstar Airlines</a>
                        </div>
                </li>
        </ul>
                </li>
                
</ul>